// default package
// Generated 28 Jul, 2014 8:04:07 PM by Hibernate Tools 3.4.0.CR1
package com.galaxy.bean;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * CustomerFormAttribute generated by hbm2java
 */
@Entity
@Table(name = "customer_form_attribute", catalog = "magento")
public class CustomerFormAttribute implements java.io.Serializable {
	private static final long serialVersionUID = 121323L;

	private CustomerFormAttributeId id;
	private EavAttribute eavAttribute;

	public CustomerFormAttribute() {
	}

	public CustomerFormAttribute(CustomerFormAttributeId id,
			EavAttribute eavAttribute) {
		this.id = id;
		this.eavAttribute = eavAttribute;
	}

	@EmbeddedId
	@AttributeOverrides({
			@AttributeOverride(name = "formCode", column = @Column(name = "form_code", nullable = false, length = 32)),
			@AttributeOverride(name = "attributeId", column = @Column(name = "attribute_id", nullable = false)) })
	public CustomerFormAttributeId getId() {
		return this.id;
	}

	public void setId(CustomerFormAttributeId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "attribute_id", nullable = false, insertable = false, updatable = false)
	public EavAttribute getEavAttribute() {
		return this.eavAttribute;
	}

	public void setEavAttribute(EavAttribute eavAttribute) {
		this.eavAttribute = eavAttribute;
	}

}
